#include <vector>
#include <iostream>

using namespace std;

int maxSum(vector<int> array){
    if (array.size() == 1){
        return array[0];
    }
    vector<int> zhx = array;
    for (int i = 2; i < array.size(); ++i){
        zhx[i] = max(zhx[i - 1], zhx[i - 2] + array[i]);
    }
    return zhx[zhx.size() - 1];
}
int main(int argc, char const *argv[])
{
    cout<<maxSum(vector<int> {75, 105, 120, 75, 90, 135})<<endl;
    return 0;
}
